<template xmlns:v-on="http://www.w3.org/1999/xhtml">
  <div class="content">
    <div class="content-center">
      <!-- 头部 -->
      <div class="main-title">
        <h2>待面试</h2>
      </div>
      <!--筛选-->
      <div class="main-search">
        <div class="title-left">
          <div>
              <select @change="selectTypesClick" v-model="type">
                <option v-for="(type,index) in types" v-bind:value="index" :key="index">{{type.name}}</option>
              </select>
          </div>
          <div>
              <select @change="selectTypesClick" v-model="scheduletype">
                <option v-for="(type,index) in scheduletypes" v-bind:value="index" :key="index">{{type.name}}</option>
              </select>
          </div>
          <div class="searchInput">
            <div class="searchInput-input">
              <div>
                <input type="text" placeholder="请输入">
              </div>
              <div>
                搜索
              </div>              
            </div>
          </div>
          <div class="searchBut">
            <div class="searchBut-search">
              <div class="title-r-but-left">
               <img src="static/img/搜索@3x.png" alt="">
              </div>
              <div class="title-r-but-right">
               查询
              </div>
            </div>
            <div class="searchBut-cancel">
              <div class="title-r-but-left">
               <img src="static/img/清空.png" alt="">
              </div>
              <div class="title-r-but-right">
               清空
              </div>
            </div>
          </div>
        </div>
        <div class="title-right">
          <!-- <div class="title-right-but">
             <div class="title-r-but-left">
               <img src="static/img/1@3x.png" alt="">
             </div>
             <div class="title-r-but-right">
               发布简历
             </div>
          </div> -->
        </div>
      </div>
      <!--列表-->
      <div class="main-list">
        <ul>
          <li class="fistLi">
            <div class="liOne">渠道</div>
            <div class="liOne">姓名</div>
            <div class="liOne">岗位</div>
            <div class="liOne">工作年限</div>
            <div class="liOne">面试人</div>
            <div class="liOne">沟通人</div>
            <div class="liOne">面试时间</div>
            <div class="liOne">面试进度</div>
            <div class="liOne">操作</div>
          </li>
          <li class="dataLi" v-for="(item,index) in lists" :key="index">
            <div>待面试</div>
            <div>{{item.name}}</div>
            <div>产品经理</div>
            <div>12年</div>
            <div>有文化区</div>
            <div>有文化区</div>
            <div>2017.01.01--10.30</div>
            <div>第四轮</div>
            <div class="data-operation">
              <div @click="offerClick(index)"><img src="static/img/发送offer.png" alt="" title="发送offer"></div>
              <div @click="lookClick(index)"><img src="static/img/预览.png" alt="" title="预览"></div>
              <div @click='opAwaitClick(index)'><img src="static/img/详情.png" alt="" title="详情"></div>
              <div @click="feedbackClick(index)"><img src="static/img/反馈.png" alt="" title="反馈"></div>
              <div @click="updatemEessageClick(index)"><img src="static/img/更改标签.png" alt="" title="更改信息"></div>             
            </div>
          </li>
          <li class="pageLi">
            <div></div>
            <div>
              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]"
                  :page-size="pageSizeNum" layout="total,sizes,prev, pager, next,jumper" :total="totalNum">
               </el-pagination>
            </div>
          </li>
        </ul>
      </div>
      <div :class="{showdel:isShowdel}" class="delPopup">
        <transition name="slide-fade">
            <v-mDel @ok="confirmClick" @canle="cancelClick" :name="titlename"></v-mDel>
        </transition>
      </div>
      <div v-show="isShowLook" class="lookShow">
        <div class="main-lookShow">
          <div class="main-lookShow-top">
            <div>个人简历</div>
            <div @click="lookHideClick">X</div>
          </div>
          <div class="main-lookShow-bottom">

          </div>
        </div>
      </div>
      <div v-show="isShowupdatemEessage" class="updatemEessageShow">
        <div class="main-updatemEessageShow">
          <div class="main-updatemEessageShow-top">
            <div>更改面试信息</div>
            <!-- <div @click="lookHideClick">X</div> -->
          </div>
          <div class="main-updatemEessageShow-bottom">
            <div class="main-updatemEessage-list">
              <div>
                面试官
              </div>
              <div>
                <input type="text">
              </div>
            </div>
            <div class="main-updatemEessage-list">
              <div>
                面试时间
              </div>
              <div>
                <input type="text">
              </div>
            </div>
            <div class="main-updatemEessage-button">
              <div class="button-save">确定</div>
              <div @click="lookHideClick" class="button-cancel">取消</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { mapActions } from "vuex";
import mDel from "../module/mDel";
export default {
  components: {
    "v-mDel": mDel
  },
  data() {
    return {
      isShowupdatemEessage: false,
      isShowLook: false,
      lists: [
        {
          id: 1,
          creator: 0,
          createDate: 0,
          lastModifier: 0,
          lastModDate: 0,
          deleteFlag: 1,
          name: "成意",
          phone: null,
          email: null,
          source: 1,
          position: null,
          workYear: null,
          sex: "男",
          hr: null,
          contactTime: null,
          status: null
        }
      ],
      type: "0",
      types: [{ name: "全部岗位" }, { name: "岗位1" }],
      scheduletype: 0,
      scheduletypes: [
        { name: "全部进度" },
        { name: "第一轮" },
        { name: "第二轮" },
        { name: "第三轮" },
        { name: "第四轮" }
      ],
      isShowdel: true,
      intercept: false,
      toPath: "",
      titlename: "？",
      isShowdelIndex: "0",
      pageSizeNum: 10,
      currentPage: 1,
      totalNum: 1000
    };
  },
  // 过滤
  filters: {
    timeFun: function(val) {
      var now = new Date(val);
      var year = now.getYear() - 100;
      var month = now.getMonth() + 1;
      month = month > 9 ? month : "0 " + month;
      var date = now.getDate();
      date = date > 9 ? date : "0 " + date;
      var hour = now.getHours();
      hour = hour > 9 ? hour : "0 " + hour;
      var minute = now.getMinutes();
      minute = minute > 9 ? minute : "0 " + minute;
      return (
        "20 " + year + "- " + month + "- " + date + " " + hour + ": " + minute
      );
    }
  },
  // 模块新建时
  created: function() {
    var self = this;
  },
  // 计算属性
  mounted() {},
  // 事件处理
  methods: {
    // 反馈
    feedbackClick() {
      this.$router.push({
        path: "/home/interview/opFeedback"
      });
    },
    // 更改信息
    updatemEessageClick() {
      this.isShowupdatemEessage = true;
    },
    // 详情
    opAwaitClick() {
      this.$router.push({
        path: "/home/resume/opResume"
      });
    },
    // 预览
    lookHideClick() {
      this.isShowLook = false;
      this.isShowupdatemEessage = false;
    },
    lookClick(index) {
      this.isShowLook = true;
    },
    // 发送offer
    offerClick() {
      this.isShowdel = false;
      this.titlename = "是否发送offer？";
      this.isShowdelIndex = 1;
    },
    confirmClick() {
      var self = this;
      this.isShowdel = true;
      if (self.isShowdelIndex == 5) {
      } else if (self.isShowdelIndex == 1) {
        self.$router.push({
          path: "/home/interview/opOffer"
        });
      } else if (self.isShowdelIndex == 4) {
        self.$router.push({
          path: "/home/interview/opblackType"
        });
      }
    },
    cancelClick() {
      this.isShowdel = true;
      this.isShowdelIndex = 0;
    },
    // 点击分页
    handleCurrentChange(val) {
      var self = this;
      self.currentPage = val;
      self.listFun();
    },
    // 选择每页个数
    handleSizeChange(val) {
      var self = this;
      self.pageSizeNum = val;
      self.listFun();
    },
    // 获取列表
    listFun() {
      var self = this;
      self
        .getstoreclassAttributefindPage({})
        .then(data => {
          if (data.code == 200) {
          } else {
          }
        })
        .catch(msg => {});
    },
    selectTypesClick() {},
    ...mapActions(["getstoreclassAttributefindPage"])
  },
  // 监视
  watch: {}
};
</script>
<style scoped>
.fistLi,
.dataLi,
.pageLi {
  width: 100%;
  min-height: 50px;
}
.pageLi {
  margin-top: 15px;
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pageLi > div:nth-child(1) {
  width: 100px;
}
.pageLi > div:nth-child(2) {
  min-width: 300px;
  margin-right: 5px;
}
.fistLi {
  border-bottom: 3px solid #eeeded;
  display: flex;
}
.dataLi {
  border-bottom: 1px solid #ccc;
  display: flex;
}
.fistLi > div {
  color: #666;
  font-size: 15px;
  font-weight: 600;
}
.dataLi > div {
  color: #717171;
  font-size: 13px;
}
.fistLi > div,
.dataLi > div {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fistLi > div:nth-child(1),
.dataLi > div:nth-child(1) {
  width: 9%;
  min-width: 45px;
}
.fistLi > div:nth-child(2),
.dataLi > div:nth-child(2) {
  width: 10%;
  min-width: 45px;
}
.fistLi > div:nth-child(3),
.dataLi > div:nth-child(3) {
  width: 9%;
  min-width: 70px;
}
.fistLi > div:nth-child(4),
.dataLi > div:nth-child(4) {
  width: 9%;
  min-width: 70px;
}
.fistLi > div:nth-child(5),
.dataLi > div:nth-child(5) {
  width: 9%;
  min-width: 70px;
}
.fistLi > div:nth-child(6),
.dataLi > div:nth-child(6) {
  width: 9%;
  min-width: 70px;
}
.fistLi > div:nth-child(7),
.dataLi > div:nth-child(7) {
  width: 12%;
  min-width: 115px;
}
.fistLi > div:nth-child(8),
.dataLi > div:nth-child(8) {
  width: 8%;
  min-width: 60px;
}
.fistLi > div:nth-child(9) {
  width: 25%;
}
.dataLi .data-operation {
  display: flex;
  width: 25%;
  justify-content: space-around;
  align-items: center;
}
.data-operation > div {
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.data-operation > div img {
  width: 100%;
  height: 100%;
}
.searchInput-input {
  height: 28px;
  width: 200px;
  display: flex;
  border: 1px solid #9c9c9c;
  border-radius: 3px;
}
.searchInput {
  display: flex;
  width: 205px;
  align-items: center;
}
.searchInput-input > div:nth-child(2) {
  font-size: 13px;
  color: #000;
  height: 28px;
  line-height: 28px;
  width: 30px;
  text-align: center;
}
.searchInput-input > div:nth-child(1) {
  display: flex;
  align-items: center;
}
.searchInput-input > div:nth-child(1) input {
  width: 160px;
  height: 27px;
  border: 0;
  line-height: 27px;
  font-size: 13px;
  padding-left: 7px;
}
.searchBut-search {
  width: 60px;
  height: 30px;
  line-height: 30px;
  background-color: #fe966d;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-radius: 3px;
  cursor: pointer;
}
.searchBut-cancel {
  width: 60px;
  height: 30px;
  line-height: 30px;
  background-color: #fe966d;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 10px;
}
.searchBut {
  display: flex;
}
.title-left > div {
  margin-left: 15px;
}
.title-left select {
  width: 100px;
  height: 30px;
  border-radius: 4px;
  font-size: #666;
  border: 1px solid #9c9c9c;
}
select::-ms-expand,
select::-webkit-expand {
  display: none;
}
.title-left {
  height: 50px;
  min-width: 300px;
  display: flex;
  align-items: center;
}
.title-right {
  height: 50px;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.title-r-but-right {
  min-width: 15px;
  font-size: 13px;
  color: #fff;
}
.title-r-but-left {
  width: 15px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.title-r-but-left img {
  width: 100%;
  height: 100%;
  width: 12px;
  height: 12px;
}
.title-right-but {
  width: 90px;
  height: 30px;
  line-height: 30px;
  background-color: #2fa89e;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-radius: 3px;
  cursor: pointer;
}
.main-title h2 {
  height: 100%;
  margin-left: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #666;
}
.main-title {
  margin-left: 10px;
  width: 100%;
  height: 55px;
  background-color: #fff;
  line-height: 55px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-search {
  width: 100%;
  margin-top: 10px;
  height: 40px;
  background-color: #fff;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-list ul {
  width: 100%;
  overflow: hidden;
  min-height: 500px;
}
.main-list {
  width: 100%;
  margin-top: 15px;
  min-height: 50px;
  /* border: 2px solid #00beff; */
  background-color: #ffff;
}

.content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* background-color: #ccc; */
  min-height: 350px;
}

.content-center {
  overflow: hidden;
  width: calc(100% - 20px);
  margin-left: 10px;
  background-color: #fff;
  margin-top: 33px;
  border-radius: 3px;
}

/*取消弹出框*/

.delPopup {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showdel {
  display: none;
}

.main-lookShow-top > div:nth-child(1) {
  font-size: 16px;
  font-weight: 600;
  color: #5c5c5c;
  margin-left: 20px;
}
.main-lookShow-top > div:nth-child(2) {
  margin-right: 20px;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 35px;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.main-lookShow-top {
  display: flex;
  justify-content: space-between;
  height: 55px;
  align-items: center;
}

.main-lookShow {
  width: 650px;
  height: 650px;
  background-color: #fff;
  border-radius: 5px;
}
.lookShow {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-updatemEessage-list input {
  width: 250px;
  border-radius: 4px;
  height: 32px;
  line-height: 32px;
  border: 1px solid #ccc;
}
.main-updatemEessage-list > div:nth-child(1) {
  width: 100px;
  text-align: right;
}
.main-updatemEessage-list > div:nth-child(2) {
  width: 300px;
  margin-left: 15px;
}
.main-updatemEessage-list {
  height: 50px;
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}
.button-save {
  width: 80px;
  height: 28px;
  border-radius: 4px;
  background-color: #fe966d;
  text-align: center;
  line-height: 28px;
  color: #fff;
  cursor: pointer;
}
.button-cancel {
  cursor: pointer;
  margin-left: 30px;
  width: 80px;
  text-align: center;
  line-height: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: #d1d2d2;
  color: #fff;
}
.main-updatemEessage-button {
  height: 50px;
  margin-top: 25px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.main-updatemEessageShow-bottom {
  height: 355px;
}
.main-updatemEessageShow-top > div:nth-child(1) {
  font-size: 16px;
  font-weight: 600;
  color: #5c5c5c;
  margin-left: 20px;
}
.main-updatemEessageShow-top > div:nth-child(2) {
  margin-right: 20px;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 35px;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.main-updatemEessageShow-top {
  display: flex;
  justify-content: space-between;
  height: 55px;
  align-items: center;
}

.main-updatemEessageShow {
  width: 455px;
  height: 270px;
  background-color: #fff;
  border-radius: 5px;
}
.updatemEessageShow {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-fade-enter-active {
  transition: all 0.7s ease;
}

.slide-fade-enter,
.slide-fade-leave-active {
  transform: translateY(-30px);
  opacity: 0;
}
</style>